package com.dynamictpm.core;

import com.dynamictpm.client.ClientWorker;
import com.dynamictpm.config.DynamicThreadPoolProperties;
import com.dynamictpm.listener.Listener;
import com.dynamictpm.remote.HttpAgent;
import com.dynamictpm.remote.ServerHttpAgent;

import java.util.Arrays;

/**
 * 描述：： 线程池配置服务
 * <p>
 * ------------------------------------
 *
 * @program: dynamic-tpm
 * @ClassName ThreadPoolConfigService
 * @author: it-yml
 * @create: 2023-07-04 21:24
 * @Version 1.0
 * --------------------------------------
 **/
public class ThreadPoolConfigService implements ConfigService{
    private final HttpAgent httpAgent;

    private final ClientWorker clientWorker;

    public ThreadPoolConfigService(DynamicThreadPoolProperties properties) {
        httpAgent = new ServerHttpAgent(properties);
        clientWorker = new ClientWorker(httpAgent);
    }
    @Override
    public void addListener(String tenantId, String itemId, String tpId, Listener listener) {
//        clientWorker.addTenantListeners(tenantId, itemId, tpId, Arrays.asList(listener));
    }

    @Override
    public String getServerStatus() {
        return null;
    }
}
